package com.jt.tenant.conn;

import com.jt.tenant.app.JTApplication;
import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;

import org.json.JSONObject;

/**
 * 诊断报告
 */
@HttpInlet(Conn.INLET_GET_SHOCK_SETTING)
public class SetShockSetting extends JTAsyGet<SetShockSetting.Info> {

    public String token = JTApplication.jtPreferences.readToken();

    public int value;

    public int isOpen;

    public SetShockSetting(int value, int isOpen, AsyCallBack<Info> asyCallBack) {

        super(asyCallBack);

        this.value = value;

        this.isOpen = isOpen;
    }

    @Override
    protected Info parser(JSONObject object) {

        JSONObject apiTYF = object.optJSONObject("apiTYF");

        JSONObject head = apiTYF.optJSONObject("head");

        Info info = new Info();

        info.msg = head.optString("msg");

        return info;

    }

    public static class Info {

        public String msg;
    }
}
